{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# To install do\n",
    "# pip install python-twitter"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import twitter\n",
    "\n",
    "ACCESS_TOKEN = ''\n",
    "ACCESS_SECRET = ''\n",
    "CONSUMER_KEY = ''\n",
    "CONSUMER_SECRET = ''\n",
    "\n",
    "t = twitter.Api(consumer_key=CONSUMER_KEY,\n",
    "                consumer_secret=CONSUMER_SECRET,\n",
    "                access_token_key=ACCESS_TOKEN,\n",
    "                access_token_secret=ACCESS_SECRET)\n",
    "\n",
    "results = t.GetSearch(raw_query=\"q=from%3AGalarnykMichael&src=typd\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "results = t.GetSearch(raw_query=\"q=from%3AGalarnykMichael&src=typd\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Status(ID=1054774887821144064, ScreenName=GalarnykMichael, Created=Tue Oct 23 16:41:44 +0000 2018, Text='@thestartup_ Thanks! I will submit something in the future!'),\n",
       " Status(ID=1054522320230871042, ScreenName=GalarnykMichael, Created=Mon Oct 22 23:58:07 +0000 2018, Text=\"RT @0xAmit: I've never met a single person that enjoys working in an open space office. There are a lot of people (myself included) with ma…\"),\n",
       " Status(ID=1053462978605965312, ScreenName=GalarnykMichael, Created=Sat Oct 20 01:48:41 +0000 2018, Text='@brianavecchione @CornellCIS @ioanauoft thanks for following up! Good to see them getting rid of that requirement!'),\n",
       " Status(ID=1053407353842749440, ScreenName=GalarnykMichael, Created=Fri Oct 19 22:07:39 +0000 2018, Text=\"@brianavecchione @CornellCIS @ioanauoft @brianavecchione I imagine it isn't showing up on the website yet because t… https://t.co/shBns6rJkW\"),\n",
       " Status(ID=1053407046630989824, ScreenName=GalarnykMichael, Created=Fri Oct 19 22:06:25 +0000 2018, Text='RT @brianavecchione: Important to note that @CornellCIS no longer requires the GRE! (was shown to be a significant factor in discouraging q…')]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
